RDKEMW-23367 : ctrlm-main - coverity issues - #269
Open
dwolaver wants to merge 3 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
Addresses Coverity findings in ctrlm-main by tightening memory/thread lifecycle handling and making persisted shutdown-time serialization robust across 32-bit vs 64-bit time_t platforms.
Changes:
- Fix old-style voice settings DB blob cleanup by using
ctrlm_db_free()consistently. - Rework HAL-termination synchronization to use an owned
sem_tplus atomic ref-counting to avoid leaks/use-after-free across threads. - Serialize/deserialize shutdown time using
sizeof(time_t)while still accepting legacy 4-byte payloads.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/voice/ctrlm_voice_obj.cpp | Ensures voice settings blob read from DB is freed via ctrlm_db_free() in all paths. |
| src/ctrlm_network.h | Updates termination thread data struct to embed a semaphore and add atomic ref-counting. |
| src/ctrlm_network.cpp | Adds ref-counted cleanup and proper semaphore init/destroy for safe termination-thread coordination. |
| src/ctrlm_main.cpp | Updates shutdown-time packing/unpacking to handle 64-bit time_t while supporting legacy 4-byte format. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.